<template>
  <div>
    <div class="swiper-container" :class="swiperClass">
      <div class="swiper-wrapper">
        <slot></slot>
      </div>
    </div>
  </div>
</template>
<script>
import Swiper from "swiper/swiper-bundle.js"; //引入js
import "swiper/swiper-bundle.min.css"; //引入css
export default {
  props: ["swiperClass", "slideNum"],
  updated() {
    new Swiper("." + this.swiperClass, {
      slidesPerView: this.slideNum,
      spaceBetween: 10,
      freeMode: true,
    });
  },
};
</script>
